<?php
class Contact extends CI_Model
{
	function __construct()
	{
		parent::__construct();
		
	}
	function get_contacts()
	{
		$this->db->select('*');
		$query = $this->db->get_where('contacts');
		return $query;
	}
	function create($data)
	{
		$this->db->insert('contacts',$data);
	}
	function update($data)
	{
		$this->db->update('contacts',$data,array('id'	=>$data['id']));
	}
	function delete($id)
	{
		$this->db->delete('contacts',array('id'	=> $id));
	}
}
?>